package sharemem

const (
	BATTLE_GROUP_BATTLE = 3
)

type BattleGroup struct {
	Id        int32
	Battle   [BATTLE_GROUP_BATTLE]int32
	End_time	int32
	Condition		[BATTLE_PARAM_MAX1][BATTLE_PARAM_MAX2]int32
}

func (tmp *BattleGroup) meminit() {
	var i,j int32
	tmp.Id = 0
	for i = 0; i < BATTLE_GROUP_BATTLE; i++ {
		tmp.Battle[i] = 0
	}
	tmp.End_time = 0
	for i = 0; i < BATTLE_PARAM_MAX1; i++ {
		for j=0;j<BATTLE_PARAM_MAX2;j++ {
			tmp.Condition[i][j] = 0
		}
	}
}
func (tmp *BattleGroup) isUse() bool {
	return tmp.Id > 0
}
func (tmp *BattleGroup) getId() int32 {
	return tmp.Id
}

func Get_config_battle_group(id int32) *BattleGroup {
	v, ok := GetConfigBattleGroupMap()[id]
	if !ok {
		return nil
	}

	return v
}
